package com.qf.utils;

import com.qf.states.StatesCode;

/**
 * @author xufuhan
 * @Date 2024/9/9 22:58
 */

public class ResultUtil {
    public static ResultVo success(){
        return new ResultVo(null, StatesCode.SUCCESS_CODE,null);
    }
    public static ResultVo success(String msg){
        return new ResultVo(msg, StatesCode.SUCCESS_CODE,null);
    }
    public static ResultVo success(String msg,Object data){
        return new ResultVo(msg, StatesCode.SUCCESS_CODE,data);
    }

    public static ResultVo error(){
        return new ResultVo(null, StatesCode.SUCCESS_CODE,null);
    }
    public static ResultVo error(String msg){
        return new ResultVo(msg, StatesCode.SUCCESS_CODE,null);
    }
    public static ResultVo error(String msg,int code){
        return new ResultVo(msg, code,null);
    }
    public static ResultVo error(String msg,int code,Object data){
        return new ResultVo(msg, code,data);
    }
    public static ResultVo error(String msg,Object data){
        return new ResultVo(msg, StatesCode.ERROR_CODE,data);
    }


}
